<template>
  <div>
    
    <page-list
      :url="url"
      ref="pageList"
    >
      <van-cell
        class="card"
        @click="getDetail(item)"
        v-for="(item, index) in data"
        :key="index"
      >
        <div>
          <div>
            <van-row>
              <van-col span="24">
                <div
                  style="margin-top: 10px; margin-bottom: 10px"
                  id="divFile"
                >
                  <file-list-read-only
                    :attachs="item.Record"
                    :labelName="'上传文件:'"
                  ></file-list-read-only>
                </div>
              </van-col>
            </van-row>
            <van-row gutter="20">
              <van-col>
                <img
                  class="icon"
                  src="@/assets/Images/AppIcon/icon_danger_main_assign.png"
                />上传时间: {{ item.CreateDate }}
              </van-col>
            </van-row>
            <van-row gutter="20">
              <van-col>
                <img
                  class="icon"
                  src="@/assets/Images/AppIcon/icon_danger_main_assign.png"
                />备注: {{ item.Remarks }}
              </van-col>
            </van-row>
          </div>
        </div>
      </van-cell>
    </page-list>
  </div>
</template>

<script>
import PageList from "../../../components/PageList/PageList.vue";
import FileListReadOnly from "../../../components/Attach/FileListReadOnlyYat.vue";
export default {
  components: { PageList,FileListReadOnly },
  data() {
    return {
      id: this.$route.query.id,
			templateId: this.$route.query.templateId,
			data: {
				
			},
      rightValue: 0,
    //   GET /api/YatManagementDocsRecordApi/GetPageData
      url: '/YatManagementDocsRecordApi/GetPageData',
    };
  },
   beforeMount () {
		this.data = []

		
		//store.commit('updateTitle', title)
	},
	created() {
		
		this.getDetail();
	},
    activated() {},
     methods: {
      getDetail() {
			let params = {  id: this.id, templateId: this.templateId };
			this.$axios
				.get(this.url, { params: params })
				.then((res) => {
				this.data = res.data.Data;
				});
		},
  },
};
</script>
<style lang="less" scoped>
.icon {
  vertical-align:middle;
}
</style>
